package com.example.springstudy.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 异常返回结构
 *
 * @author Pan
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class ServiceResult<T> {

    /**
     * 是否成功
     */
    private Boolean success;

    /**
     * 状态码
     */
    private Integer code;


    /**
     * 消息
     */
    private String message;


    /**
     * 数据
     */
    private T data;
}
